﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Core.DataAccess.Model.Migrations.Project
{
    public partial class inits : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "execTypeInfo",
                table: "Project_User_Api_Log");

            migrationBuilder.DropColumn(
                name: "apiDay",
                table: "Project_User_Api");

            migrationBuilder.DropColumn(
                name: "Android",
                table: "Project_List");

            migrationBuilder.DropColumn(
                name: "IOS",
                table: "Project_List");

            migrationBuilder.DropColumn(
                name: "PC",
                table: "Project_List");

            migrationBuilder.DropColumn(
                name: "WAP",
                table: "Project_List");

            migrationBuilder.DropColumn(
                name: "Weixin",
                table: "Project_List");

            migrationBuilder.RenameColumn(
                name: "apiType",
                table: "Project_User_Api_Log",
                newName: "UseUserKey");

            migrationBuilder.AddColumn<int>(
                name: "ApiKey",
                table: "Project_User_Api_Log",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "state",
                table: "Project_User_Api_Log",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<DateTime>(
                name: "EndTime",
                table: "Project_User_Api",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "EndIp",
                table: "Project_User",
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ApiKey",
                table: "Project_User_Api_Log");

            migrationBuilder.DropColumn(
                name: "state",
                table: "Project_User_Api_Log");

            migrationBuilder.DropColumn(
                name: "EndTime",
                table: "Project_User_Api");

            migrationBuilder.DropColumn(
                name: "EndIp",
                table: "Project_User");

            migrationBuilder.RenameColumn(
                name: "UseUserKey",
                table: "Project_User_Api_Log",
                newName: "apiType");

            migrationBuilder.AddColumn<string>(
                name: "execTypeInfo",
                table: "Project_User_Api_Log",
                unicode: false,
                maxLength: 50,
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "apiDay",
                table: "Project_User_Api",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<bool>(
                name: "Android",
                table: "Project_List",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<bool>(
                name: "IOS",
                table: "Project_List",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<bool>(
                name: "PC",
                table: "Project_List",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<bool>(
                name: "WAP",
                table: "Project_List",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<bool>(
                name: "Weixin",
                table: "Project_List",
                nullable: false,
                defaultValue: false);
        }
    }
}
